/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package heartinjava;

import java.awt.Container;
import javax.swing.ImageIcon;
import javax.swing.JFrame;

/**
 *
 * @author TIENDAT
 */

public class KhungBanCo extends JFrame {
    
    //-- khung chua cac component
    public Container container;

    public KhungBanCo(final HeartInJava aThis) 
    {
        setBounds(300, 20, 900, 700);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setTitle("Heart In Java Game - 1141335 - 1141326 - HCMUS");
        ImageIcon icon = new ImageIcon(this.getClass().getResource("resources/icon.png"));
        setIconImage(icon.getImage());
        
        //--ko cho sua
        setResizable(false);
        setVisible(true);
        container = getContentPane();
        container.setLayout(null);
    }

    private KhungBanCo() 
    {
        setBounds(300, 200, 900, 700);
    }

    public void Paint(int index) 
    {
        switch(index)
        {
            case 1: // DUOI
                this.repaint(150, 400, 500, 200); break;
            case 2: // PHAI
                this.repaint(650, 0, 150, 600); break;
            case 3: // TREN
                this.repaint(150, 0, 500, 200); break;
            case 4: // TRAI
                this.repaint(0, 0, 150, 570); break;
            case 5: // GIUA
                this.repaint(150, 200, 500, 200); break;
        }
    }
}
